import axiosData from "@/api/axios";

export default {
  /**
   * @description: 获取维修类型管理列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @param {Object} entity {} *
   * @return {Array}
   */
  queryPageList(params) {
    return axiosData.post("/v3/equipment-hitch/v1/hitchType/queryPageList", params);
  },
  /**
   * @description:获取所有维修类型 *代表必填
   * @return {Array}
   */
  findAll(params) {
    return axiosData.post("/v3/equipment-hitch/v1/hitchType/queryByCondition", params);
  },
  /**
   * @description: 新增维修类型管理
   * @param {Object} params *
   * @return {Object}
   */
  add(params) {
    return axiosData.post("/v3/equipment-hitch/v1/hitchType/add", {
      ...params,
      farmingTypeNo: sessionStorage.farmingTypeNo,
      farming: sessionStorage.farming
    });
  },
  /**
   * @description: 编辑维修类型管理
   * @param {Object} params *
   * @return {Object}
   */
  edit(params) {
    return axiosData.post("/v3/equipment-hitch/v1/hitchType/edit", params);
  },
  /**
   * @description: 查询被引用的故障类型
   * @param {Object} params *
   * @return {Object}
   */
  queryQuotedEquHitchType(params) {
    return axiosData.get("/v3/equipment-hitch/v1/hitchType/queryQuotedEquHitchType", params);
  },
  /**
   * @description: 批量删除维修类型管理
   * @param {Object} params *
   * @return {Object}
   */
  delList(params) {
    return axiosData.post("/v3/equipment-hitch/v1/hitchType/delByHitchTypeCodeList", params);
  }
};
